import React, {Component} from 'react';
import {Route, Switch,Redirect} from "react-router-dom";
import Home from '../../pages/testChangeRoute/Home'
import About from '../../pages/testChangeRoute/About'
import Other from '../../pages/testChangeRoute/Other'

export default class Main extends Component {

    render() {
        return (
            <div className='main'>
                <Switch>
                    <Route path='/home/:info' component={Home}></Route>
                    <Route path='/about' component={About}></Route>
                    <Route path='/other'  component={Other}></Route>
                    <Redirect to='/home'/>
                </Switch>
            </div>
        );
    }
}
